<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateUsersTable extends Migration
{
    /**
     * Run   the migrations.
     *
     * @return void
     */
    public function up()
    {
        if(!Schema::HasTable('users')){
            Schema::create('users', function (Blueprint $table) {
                $table->increments('id');
                $table->string('name')->unique();
                $table->string('email');
                $table->string('password', 60);
                $table->enum('status', ['0', '1','2'])->default('0');
                $table->integer('score')->default(50);
                $table->integer('lastLogin')->default(0);
                $table->rememberToken();
                $table->timestamps();
            });
        }
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        // Schema::drop('users');
        
    }
}
